package com.tianqi.desktop;


import com.tianqi.paypal.UIWritePaymentInfoExcel;

public class GetPaymentThread extends Thread
{
	private String date_string;
	
	public GetPaymentThread (String str)
	{
		this.date_string = str;
	}
	
	public void run()
	{
		try
		{
			MainWindow.textFieldDateText.setEditable(false);
			MainWindow.btnGetPayments.setEnabled(false);
			MainWindow.buttonCheckout.setEnabled(false);
			
			UIWritePaymentInfoExcel.writeByDay(date_string);
			
			MainWindow.textFieldDateText.setEditable(true);
			MainWindow.btnGetPayments.setEnabled(true);
			MainWindow.buttonCheckout.setEnabled(true);
			
		} catch (Exception e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
